/*
 * @Description: 个人资料
 * @Author: iamsmiling
 * @Date: 2021-05-27 22:12:50
 * @LastEditTime: 2021-06-15 18:03:34
 */
import 'package:credit_business_circle/R/R.dart';
import 'package:credit_business_circle/components/modal/city_picker_modal.dart';
import 'package:credit_business_circle/components/modal/gender_picker_modal.dart';
import 'package:credit_business_circle/components/modal/message_board_modal.dart';
import 'package:credit_business_circle/domain/local/list_tile_entity.dart';
import 'package:credit_business_circle/domain/local/profile_edit/profile_edit_entity.dart';
import 'package:credit_business_circle/domain/remote/user/user_profile_entity.dart';
import 'package:credit_business_circle/routes/app_routes.dart';
import 'package:flutter/cupertino.dart';
import 'package:get/get.dart';

class ProfileController extends GetxController {
  List<UserProfileFieldEntity> fileds = [
    UserProfileFieldEntity(label: "基本信息", tiles: [
      ListTileEntity(
          label: "头像",
          trailingWidget: ClipRRect(
            child: Image.network(
              "https://www.soumeitu.com/wp-content/uploads/2019/12/5dee0f8abbb9e.jpg",
              width: R.dimen.dp45,
              height: R.dimen.dp45,
            ),
            borderRadius: BorderRadius.circular(R.dimen.sp5),
          )),
      ListTileEntity(
          label: "昵称",
          value: "来去之间",
          onTap: () => Get.toNamed(
              AppRoutes.mine + AppRoutes.profile + AppRoutes.profileEdit,
              arguments: ProfileEditEntity(tilte: "昵称", initialValue: "来去之间"))),
      ListTileEntity(
          label: "性别",
          value: "先生",
          onTap: () => showGenderPicker(Get.context!)),
      ListTileEntity(label: "ID/邀请码", value: "10026", enabled: false),
      ListTileEntity(label: "登录账号", value: "13958756888", enabled: false),
    ]),
    UserProfileFieldEntity(label: "职业信息", tiles: [
      ListTileEntity(
          label: "真实姓名",
          onTap: () => Get.toNamed(
              AppRoutes.mine + AppRoutes.profile + AppRoutes.profileEdit,
              arguments:
                  ProfileEditEntity(tilte: "真实姓名", initialValue: "李狗蛋"))),
      ListTileEntity(
          label: "公司名称",
          value: "温州游模网络科技有限公司",
          onTap: () => Get.toNamed(
              AppRoutes.mine + AppRoutes.profile + AppRoutes.companyEdit)),
      ListTileEntity(label: "所在地区", onTap: () => showCityPicker(Get.context!)),
      ListTileEntity(
          label: "职务",
          onTap: () => Get.toNamed(
              AppRoutes.mine + AppRoutes.profile + AppRoutes.profileEdit,
              arguments: ProfileEditEntity(tilte: "职务"))),
      ListTileEntity(
          label: "品牌",
          onTap: () =>
              showMessageBoardModal(Get.context!, onMessageTap: (String s) {})),
      ListTileEntity(
          label: "简介",
          onTap: () => Get.toNamed(
              AppRoutes.mine + AppRoutes.profile + AppRoutes.companyProfile,
              arguments: ProfileEditEntity(
                  tilte: "简介",
                  initialValue:
                      "19楼是十九楼网络股份有限公司旗下网站，致力于为各地用户提供便捷的生活交流空间和体贴的本地生活服务，同时为商家提供线上线下无缝融合的互动营销解决方案。 19楼的核心用户群是18到45岁间的城市女性，她们爱生活、爱分享，在恋爱、结婚、育儿、装修等方面，与同城网友热烈讨论，贡献知识，分享经验，相互帮助。"))),
    ]),
    UserProfileFieldEntity(label: "联系信息", tiles: [
      ListTileEntity(
          label: "手机号",
          onTap: () => Get.toNamed(
              AppRoutes.mine + AppRoutes.profile + AppRoutes.profileEdit,
              arguments: ProfileEditEntity(tilte: "手机号"))),
      ListTileEntity(
          label: "微信号",
          value: "sdf2526689",
          onTap: () => Get.toNamed(
              AppRoutes.mine + AppRoutes.profile + AppRoutes.profileEdit,
              arguments: ProfileEditEntity(tilte: "微信号"))),
      ListTileEntity(
          label: "QQ号",
          value: "36985654",
          onTap: () => Get.toNamed(
              AppRoutes.mine + AppRoutes.profile + AppRoutes.profileEdit,
              arguments: ProfileEditEntity(tilte: "QQ号"))),
      ListTileEntity(
          label: "电子邮箱",
          onTap: () => Get.toNamed(
              AppRoutes.mine + AppRoutes.profile + AppRoutes.profileEdit,
              arguments: ProfileEditEntity(tilte: "电子邮箱"))),
    ])
  ];
}
